import Vue from 'vue'
import App from './App'
//数据管理中心
import store from '@/config/store'
Vue.prototype.$store = store;
//权限配置中心
import base from '@/config/base'
Vue.prototype.$base = base;
//挂载全局http请求
import $http from '@/config/requestConfig'
Vue.prototype.$http = $http;
//挂载apis
import { apis } from '@/api'
Vue.prototype.$apis = apis;
// 挂载权限
// import { auth } from '@/common/js/auth';
// Vue.prototype.$auth = auth;
//PageModel页面缓存
import PageModel from '@/common/page-model/page-model.js'
Vue.prototype.$pages = new PageModel();

Vue.config.productionTip = false;

//全局组件
import MescrollBody from "@/plugins/mescroll-uni/mescroll-body.vue";
Vue.component("mescroll-body", MescrollBody);
import MescrollUni from "@/plugins/mescroll-uni/mescroll-uni.vue";
Vue.component('mescroll-uni', MescrollUni);
App.mpType = 'app';

// 添加全局过滤器
import { myFilter } from '@/common/js/filters.js';
Vue.use(myFilter);

// 添加全局方法
import { myGlobal } from '@/common/js/global.js';
Vue.use(myGlobal);

Vue.config.errorHandler = function(e) {
	console.error(e);
}

const app = new Vue({
	store,
	...App
})
app.$mount();